<div class="panel panel-default panel-intro">
    {:build_heading()}
    <div class="panel-body">
        <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
            {:token()}
            
            <div class="alert alert-warning-light">
                通过编辑内容或关键词规则，快速进行自动回复设置。如具备开发能力，可更灵活地使用该功能。<br/>
                关闭自动回复之后，将立即对所有用户生效。
            </div>
            <div class="form-group">
                <div class="col-xs-12 col-sm-8">
                    {:build_radios('row[category]', ['text'=>__('文本'), 'image'=>__('图片')], $row['category'])}
                </div>
            </div>
            <div class="form-group" id="_text" style="display: none">
                <div class="col-xs-12 col-sm-8">
                    <textarea id="c-content" class="form-control simple-editor" name="row[content]">{:isset($row['content']) ? $row['content'] : ''}</textarea>
                </div>
            </div>
            <div class="form-group" id="_image" style="display: none">
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-image" class="form-control" size="35" name="row[image]" type="text" value="{:isset($row['image']) ? $row['image'] : ''}">
                        <input type="hidden" id="_media_id" class="_media_id" name="row[media_id]" value="{:isset($row['media_id']) ? $row['media_id'] : ''}" >
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/jpeg,image/png,image/jpg,image/bmp" data-url="{:url('ajax/wxupload')}" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-image"></ul>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-12" style="text-align: left;"> {:__('同步至')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <select class="form-control selectpicker" multiple="true" name="wechat[]">
                    <?php foreach($wechats as $id=>$wxname):?>
                        <?php if($id != $curr_wechat_id):?>
                        <option value="{$id}">{$wxname}</option>
                        <?php endif;?>
                    <?php endforeach;?>
                    </select>
                </div>
            </div>
            <div class="form-group layer-footer">
            <div class="col-xs-12 col-sm-8 text-right">
                <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
            </div>
        </div>
        </form>
    </div>
</div>
